package com.weichen.xd.data;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

/**
 * Created by Dune on 2017/9/11.
 */

public class Suggestion implements Parcelable {

    public static final Creator<Suggestion> CREATOR = new Creator<Suggestion>() {
        @Override
        public Suggestion createFromParcel(Parcel source) {
            return new Suggestion(source);
        }

        @Override
        public Suggestion[] newArray(int size) {
            return new Suggestion[size];
        }
    };
    @SerializedName("air")
    private Air air;
    @SerializedName("comf")
    private Comf comf;
    @SerializedName("cw")
    private Cw cw;
    @SerializedName("drsg")
    private Drsg drsg;
    @SerializedName("flu")
    private FluEntity flu;
    @SerializedName("sport")
    private SportEntity sport;
    @SerializedName("trav")
    private TravEntity trav;
    @SerializedName("uv")
    private UvEntity uv;

    public Suggestion() {
    }

    protected Suggestion(Parcel in) {
        this.air = in.readParcelable(Air.class.getClassLoader());
        this.comf = in.readParcelable(Comf.class.getClassLoader());
        this.cw = in.readParcelable(Cw.class.getClassLoader());
        this.drsg = in.readParcelable(Drsg.class.getClassLoader());
        this.flu = in.readParcelable(FluEntity.class.getClassLoader());
        this.sport = in.readParcelable(SportEntity.class.getClassLoader());
        this.trav = in.readParcelable(TravEntity.class.getClassLoader());
        this.uv = in.readParcelable(UvEntity.class.getClassLoader());
    }

    public Air getAir() {
        return air;
    }

    public void setAir(Air air) {
        this.air = air;
    }

    public Comf getComf() {
        return comf;
    }

    public void setComf(Comf comf) {
        this.comf = comf;
    }

    public Cw getCw() {
        return cw;
    }

    public void setCw(Cw cw) {
        this.cw = cw;
    }

    public Drsg getDrsg() {
        return drsg;
    }

    public void setDrsg(Drsg drsg) {
        this.drsg = drsg;
    }

    public FluEntity getFlu() {
        return flu;
    }

    public void setFlu(FluEntity flu) {
        this.flu = flu;
    }

    public SportEntity getSport() {
        return sport;
    }

    public void setSport(SportEntity sport) {
        this.sport = sport;
    }

    public TravEntity getTrav() {
        return trav;
    }

    public void setTrav(TravEntity trav) {
        this.trav = trav;
    }

    public UvEntity getUv() {
        return uv;
    }

    public void setUv(UvEntity uv) {
        this.uv = uv;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeParcelable(this.air, flags);
        dest.writeParcelable(this.comf, flags);
        dest.writeParcelable(this.cw, flags);
        dest.writeParcelable(this.drsg, flags);
        dest.writeParcelable(this.flu, flags);
        dest.writeParcelable(this.sport, flags);
        dest.writeParcelable(this.trav, flags);
        dest.writeParcelable(this.uv, flags);
    }

    public static class FluEntity implements Parcelable {
        public static final Creator<FluEntity> CREATOR = new Creator<FluEntity>() {
            @Override
            public FluEntity createFromParcel(Parcel source) {
                return new FluEntity(source);
            }

            @Override
            public FluEntity[] newArray(int size) {
                return new FluEntity[size];
            }
        };
        /**
         * brf : 少发
         * txt : 各项气象条件适宜，无明显降温过程，发生感冒机率较低。
         */

        @SerializedName("brf")
        private String brf;
        @SerializedName("txt")
        private String txt;

        public FluEntity() {
        }

        protected FluEntity(Parcel in) {
            this.brf = in.readString();
            this.txt = in.readString();
        }

        public String getBrf() {
            return brf;
        }

        public void setBrf(String brf) {
            this.brf = brf;
        }

        public String getTxt() {
            return txt;
        }

        public void setTxt(String txt) {
            this.txt = txt;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.brf);
            dest.writeString(this.txt);
        }
    }

    public static class SportEntity implements Parcelable {
        public static final Creator<SportEntity> CREATOR = new Creator<SportEntity>() {
            @Override
            public SportEntity createFromParcel(Parcel source) {
                return new SportEntity(source);
            }

            @Override
            public SportEntity[] newArray(int size) {
                return new SportEntity[size];
            }
        };
        /**
         * brf : 较适宜
         * txt : 天气较好，但由于风力较大，推荐您在室内进行低强度运动，若在户外运动请注意避风。
         */

        @SerializedName("brf")
        private String brf;
        @SerializedName("txt")
        private String txt;

        public SportEntity() {
        }

        protected SportEntity(Parcel in) {
            this.brf = in.readString();
            this.txt = in.readString();
        }

        public String getBrf() {
            return brf;
        }

        public void setBrf(String brf) {
            this.brf = brf;
        }

        public String getTxt() {
            return txt;
        }

        public void setTxt(String txt) {
            this.txt = txt;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.brf);
            dest.writeString(this.txt);
        }
    }

    public static class TravEntity implements Parcelable {
        public static final Creator<TravEntity> CREATOR = new Creator<TravEntity>() {
            @Override
            public TravEntity createFromParcel(Parcel source) {
                return new TravEntity(source);
            }

            @Override
            public TravEntity[] newArray(int size) {
                return new TravEntity[size];
            }
        };
        /**
         * brf : 适宜
         * txt : 天气较好，风稍大，但温度适宜，是个好天气哦。适宜旅游，您可以尽情地享受大自然的无限风光。
         */

        @SerializedName("brf")
        private String brf;
        @SerializedName("txt")
        private String txt;

        public TravEntity() {
        }

        protected TravEntity(Parcel in) {
            this.brf = in.readString();
            this.txt = in.readString();
        }

        public String getBrf() {
            return brf;
        }

        public void setBrf(String brf) {
            this.brf = brf;
        }

        public String getTxt() {
            return txt;
        }

        public void setTxt(String txt) {
            this.txt = txt;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.brf);
            dest.writeString(this.txt);
        }
    }

    public static class UvEntity implements Parcelable {
        public static final Creator<UvEntity> CREATOR = new Creator<UvEntity>() {
            @Override
            public UvEntity createFromParcel(Parcel source) {
                return new UvEntity(source);
            }

            @Override
            public UvEntity[] newArray(int size) {
                return new UvEntity[size];
            }
        };
        /**
         * brf : 强
         * txt : 紫外线辐射强，建议涂擦SPF20左右、PA++的防晒护肤品。避免在10点至14点暴露于日光下。
         */

        @SerializedName("brf")
        private String brf;
        @SerializedName("txt")
        private String txt;

        public UvEntity() {
        }

        protected UvEntity(Parcel in) {
            this.brf = in.readString();
            this.txt = in.readString();
        }

        public String getBrf() {
            return brf;
        }

        public void setBrf(String brf) {
            this.brf = brf;
        }

        public String getTxt() {
            return txt;
        }

        public void setTxt(String txt) {
            this.txt = txt;
        }

        @Override
        public int describeContents() {
            return 0;
        }

        @Override
        public void writeToParcel(Parcel dest, int flags) {
            dest.writeString(this.brf);
            dest.writeString(this.txt);
        }
    }
}
